package com.liuguang.api.user;

import com.liuguang.api.gateway.security.dto.UserInfoDTO;
import com.liuguang.common.pojo.CommonResult;

import javax.servlet.http.HttpServletRequest;

/**
 * @ClassName: UserService
 * @Description： 用户登录功能接口
 * @Author: wanghr
 * Date: 5:49 PM 2020/9/11
 * Version: 1.0
 */
public interface UserService {
    /**
     * 注册登录前获取 公钥
     *
     * @params: []
     * @return: com.liuguang.common.pojo.CommonResult
     */
    CommonResult getPublicKey();

    /**
     * 获取验证码
     *
     * @params: []
     * @return: com.liuguang.common.pojo.CommonResult
     */
    CommonResult getVerificationCode();

    /**
     * 用户注册接口：用户名、密码 注册
     *
     * @params: [userInfoDTO]
     * @return: com.liuguang.common.pojo.CommonResult<?>
     */
    CommonResult<?> userEnroll(UserInfoDTO userInfoDTO, HttpServletRequest request);

    CommonResult login(UserInfoDTO userInfoDTO, HttpServletRequest request);

    CommonResult getVerificationCodeByPhone(String phoneNumber);

    CommonResult loginByPhone(UserInfoDTO userInfoDTO);

    void test();

}
